function initialize()
% Funcion:   initilize
% Proposito: Inicializa el reloj de la simulacion
%
%
global Q_LIMIT;
global BUSY;
global IDLE;

global next_event_type;
global num_custs_delayed;
global time_limit;
global num_events;
global num_in_q;
global server_status;

global area_num_in_q;
global area_server_status;
global total_time_in_system;
global mean_arrival_1;
global service_1_params;
global service_2_params;
global time;
global time_arrival;
global time_last_event;
global time_next_event;
global total_of_delays;

% Inicializa el reloj de la simulacion
time = 0.0;

% Inicializa las variables de estado del modelo
server_status{1}   = IDLE;
server_status{2}   = IDLE;
num_in_q{1}        = 0;
num_in_q{2}        = 0;
time_last_event = 0.0;

% Inicializa los contadores estadisticos
num_custs_delayed{1}  = 0;
num_custs_delayed{2}  = 0;
total_of_delays{1}    = 0.0;
total_of_delays{2}    = 0.0;
area_num_in_q{1}      = 0.0;
area_num_in_q{2}      = 0.0;
area_server_status{1} = 0.0;
area_server_status{2} = 0.0;
total_time_in_system = 0.0;

% Inicializa la lista de eventos
% Como no hay clientes presentes, el evento:partida (servicio completo),
% es eliminado de la consideracion.
time_next_event(1) = time + expon(mean_arrival_1);
time_next_event(2) = 1.0e+030;
time_next_event(3) = 1.0e+030;
time_next_event(4) = 1.0e+030;

global countE;
global countR;

countE = 0;
countR = 0;
